package com.bed.lovewithpatientbed.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * employee
 * @author 
 */
public class Employee implements Serializable {
    private Integer employeeId;

    private String employeeName;

    private String employeePhone;

    private Integer workerMessageId;
    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd" )
    private Date employeeDate;

    private Integer softdel;

    private WorkerMessage workerMessage;

    private Role role;

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public WorkerMessage getWorkerMessage() {
        return workerMessage;
    }

    public void setWorkerMessage(WorkerMessage workerMessage) {
        this.workerMessage = workerMessage;
    }

    private static final long serialVersionUID = 1L;

    public Integer getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(Integer employeeId) {
        this.employeeId = employeeId;
    }

    public String getEmployeeName() {
        return employeeName;
    }

    public void setEmployeeName(String employeeName) {
        this.employeeName = employeeName;
    }

    public String getEmployeePhone() {
        return employeePhone;
    }

    public void setEmployeePhone(String employeePhone) {
        this.employeePhone = employeePhone;
    }

    public Integer getWorkerMessageId() {
        return workerMessageId;
    }

    public void setWorkerMessageId(Integer workerMessageId) {
        this.workerMessageId = workerMessageId;
    }

    public Date getEmployeeDate() {
        return employeeDate;
    }

    public void setEmployeeDate(Date employeeDate) {
        this.employeeDate = employeeDate;
    }

    public Integer getSoftdel() {
        return softdel;
    }

    public void setSoftdel(Integer softdel) {
        this.softdel = softdel;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Employee other = (Employee) that;
        return (this.getEmployeeId() == null ? other.getEmployeeId() == null : this.getEmployeeId().equals(other.getEmployeeId()))
            && (this.getEmployeeName() == null ? other.getEmployeeName() == null : this.getEmployeeName().equals(other.getEmployeeName()))
            && (this.getEmployeePhone() == null ? other.getEmployeePhone() == null : this.getEmployeePhone().equals(other.getEmployeePhone()))
            && (this.getWorkerMessageId() == null ? other.getWorkerMessageId() == null : this.getWorkerMessageId().equals(other.getWorkerMessageId()))
            && (this.getEmployeeDate() == null ? other.getEmployeeDate() == null : this.getEmployeeDate().equals(other.getEmployeeDate()))
            && (this.getSoftdel() == null ? other.getSoftdel() == null : this.getSoftdel().equals(other.getSoftdel()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getEmployeeId() == null) ? 0 : getEmployeeId().hashCode());
        result = prime * result + ((getEmployeeName() == null) ? 0 : getEmployeeName().hashCode());
        result = prime * result + ((getEmployeePhone() == null) ? 0 : getEmployeePhone().hashCode());
        result = prime * result + ((getWorkerMessageId() == null) ? 0 : getWorkerMessageId().hashCode());
        result = prime * result + ((getEmployeeDate() == null) ? 0 : getEmployeeDate().hashCode());
        result = prime * result + ((getSoftdel() == null) ? 0 : getSoftdel().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", employeeId=").append(employeeId);
        sb.append(", employeeName=").append(employeeName);
        sb.append(", employeePhone=").append(employeePhone);
        sb.append(", workerMessageId=").append(workerMessageId);
        sb.append(", employeeDate=").append(employeeDate);
        sb.append(", softdel=").append(softdel);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}